<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>京东轮播图练习</title>
    <link rel="stylesheet" href="../css/reset.css">
    <style>
        .img-list {
            width: 400px;
            height: 280px;
            margin: 100px auto;
            /* 开启相对定位，其他定位相对于这个img-list */
            position: relative;
        }

        .img-list li {
            position: absolute;
        }

        /* 通过修改元素的层级来显示指定的图片 */
        /* 设置第4个元素的z-index为1，就能显示在最上面 */
        .img-list li:nth-child(2) {
            z-index: 1;
        }

        .pointer {
            position: absolute;
            z-index: 9999;
            bottom: 80px;
            left: 10px;
        }

        .pointer a {
            /* 设置元素向左浮动 */
            float: left;
            width: 10px;
            height: 10px;
            margin-left: 4px;
            border-radius: 50%;
            background-color: #bfa;
            background-clip: content-box;
            border: 1px solid transparent;
        } 

        .pointer a.active,
        .pointer a:hover{
            /* 就喜欢 #bfa 豆沙绿 */
            /* background-color: #fff; */
            /* hover真好用 */
            border: 1px solid red;
        }
    </style>

</head>

<body>
    <!-- ul>li>a>img快速写标签 -->
    <ul class="img-list">
        <li><a href="javascript;;"><img src="./img/1.png" alt="图片1"></a></li>
        <li><a href="javascript;;"><img src="./img/2.png" alt="图片1"></a></li>
        <li><a href="javascript;;"><img src="./img/3.png" alt="图片1"></a></li>
        <li><a href="javascript;;"><img src="./img/4.png" alt="图片1"></a></li>
        <li><a href="javascript;;"><img src="./img/5.png" alt="图片1"></a></li>
        <li><a href="javascript;;"><img src="./img/1.png" alt="图片1"></a></li>
        <li><a href="javascript;;"><img src="./img/2.png" alt="图片1"></a></li>
        <li><a href="javascript;;"><img src="./img/3.png" alt="图片1"></a></li>

        <div class="pointer">
            <a class="active" href="javascript:;"></a>
            <a href="javascript:;"></a>
            <a href="javascript:;"></a>
            <a href="javascript:;"></a>
            <a href="javascript:;"></a>
            <a href="javascript:;"></a>
            <a href="javascript:;"></a>
            <a href="javascript:;"></a>
        </div>
    </ul>
</body>

</html>